﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Http.Controllers;
using System.Web.Mvc;

namespace CustomerServiceCenter.Helper
{
    public class LoginAuthorizeAttribute : ActionFilterAttribute
    {
        public override void OnActionExecuted(ActionExecutedContext filterContext)
        {
            if (filterContext.HttpContext.Session["adminLoginInfo"] == null)
            {
                filterContext.HttpContext.Response.Redirect("~/Home/Login");
            }
        }
    }
}